function txt($scope){
	$scope.greeting = {
		tit:'我在学习'
	};
}
// MVC
var myModule= angular.module("txt",[]);
myModule.controller("txt",["$scope",function($scope){
    $scope.title = {
    tit:"我在学习"
    }
}]);
// 模块化  指令系统
var myModule2=angular.module("myModule2",[]);
myModule2.directive("b",function(){
    return{
        restrict:"E",
        template:"<div>hi,everyone</div>",
        replace:true
    }
});
//双向数据绑定
var app=angular.module("myModule2",[]);
app.controller("myText",function($scope){
    $scope.firstName="hu";
    $scope.lastName="xu";
    $scope.firstNames=function(){
        return $scope.firstName+"..."+$scope.lastName;
    }
});
// 返回当前页面url
// var app2=angular.module("myModule2",[]);一个模块好像只能用一次 虽然命名不同 
// $location服务
app.controller("curUrl",function($scope, $location){
        $scope.curUrl=$location.absUrl();
 });
// $http服务
app.controller("httpFw",function($scope,$http){
    $http.get("js/json.json").then(function(response){
        $scope.myHttp=response.data[3].Name; 
    });
});